package pers.baiban.sqltoword.config;

import cn.hutool.core.collection.ListUtil;
import cn.hutool.system.UserInfo;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import pers.baiban.sqltoword.constant.TableConstant;
import pers.baiban.sqltoword.enums.TableStyle;

import java.util.List;

/**
 * 生成器配置文件
 *
 * @author 强子初
 * @since 2023/11/27
 */
@Data
@Component
public class GenConfig {

    @Autowired
    private GenParam genParam;

    /**
     * 生成路径
     */
    private String genPath = new UserInfo().getCurrentDir().replace('\\', '/') + "temp/";

    /**
     * 生成文件名
     */
    private String genName = genPath + "word" + ".docx";

    /**
     * 表格样式
     */
    private TableStyle tableStyle = TableStyle.SRM;

    private TableParam tableParam = tableStyle.getTableParam();

    private List<String> tableName = ListUtil.of();

    /**
     * 过滤表名
     */
    private List<String> excludeTableName = ListUtil.of(
            "gen*",
            "qrtz*",
            "sys_job*"
    );
}